]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Fix a signal leak in WorkspaceBackground
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Fri, 21 Jan 2022 10:47:09 +0000 (18:47 +0800)
committerMarge Bot <marge-bot@gnome.org>
Tue, 1 Feb 2022 12:11:54 +0000 (12:11 +0000)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2143>

js/ui/workspace.js

index 6c32f01da9bc5fd5d74d39f7014dede38027f460..1ad403f9f82b996d174c584f143dcd089c8272ca 100644 (file)
@@ -939,7 +939,7 @@ class WorkspaceBackground extends St.Widget {
         this._workarea = Main.layoutManager.getWorkAreaForMonitor(monitorIndex);
 
         this._stateAdjustment = stateAdjustment;
-        stateAdjustment.connect('notify::value', () => {
+        this._adjustmentId = stateAdjustment.connect('notify::value', () => {
             this._updateBorderRadius();
             this.queue_relayout();
         });
@@ -1054,6 +1054,11 @@ class WorkspaceBackground extends St.Widget {
             global.display.disconnect(this._workareasChangedId);
             delete this._workareasChangedId;
         }
+
+        if (this._adjustmentId) {
+            this._stateAdjustment.disconnect(this._adjustmentId);
+            delete this._adjustmentId;
+        }
     }
 });